3 visuals for webpage
This code will help produce the three visuals that are going to be a
part of each equity tracker indicator webpage: regional map (tract
level) of most recent data, chart of the most recent data, chart of
trends over time.
If the indicator is available through a tract-level data
set. Getting the data to a workable version may require some
data transformation. To explore, clean, transform, and generate a final
data set, please use the data-gen-tract-template. This script
will generate an .rda for the map and an .rda for the charts. These data
sets will be loaded in before the data visualization code.
Indicator Explanation
The cardiovascular disease mortality rate provides a way to
understand a population’s overall health. Cardiovascular disease can be
caused by diet, lack of exercise, smoking, and environmental risk
factors. Differences between groups of people can highlight differing
access to healthcare and public services, adequate nutrition, and living
conditions, all which impact a population’s susceptibility to
cardiovascular disease. For this measure, we are defining cardiovascular
disease mortality as an age-adjusted rate of deaths per 100,000 due to
cardiovascular disease, such as coronary heart disease, strokes, aortic
disease, and peripheral arterial disease.
1. Map of most recent data
Create Visual
To map data in this form, there should be a value corresponding to
each census tract. Depending on the year or source of the data, this
could be about 700 rows for data at the 2010 census tract resolution, or
about 900 rows for data at the 2020 census tract resolution.
Source(s): Washington State Department of Health, 2018-2022
Washington Tracking Network, Cardiovascular Disease Mortality - Age
Adjusted Rate per 100,000; U.S. Census Bureau, Geography Division 2020
TIGER/Line Shapefiles
Data call outs
- 80 years: The region’s average life expectancy
- 78.6 years: The regional life expectancy of communities with high
concentrations of people of color, compared to 80.8 in communities with
low concentrations, a difference of 2.2 years
- 30 years: The difference in the number of years between those living
in the census tracts with the highest and lowest life expectancy
Insights & Analysis
- King County has the highest life expectancy (80.8 years), followed
by Kitsap (80.6 years), Snohomish (79.8 years), and Pierce (78.2
years)
- Communities with the highest life expectancy are in DuPont, Pierce
County (99.4 years); the Uptown neighborhood in Seattle, King County
(96.6 years); Redmond, King County (95.8 years)
- Among the communities with the lowest life expectancy are the South
End neighborhood in Tacoma, Pierce County (68.4 years); Auburn, King
County (71.7 years); Tulalip Reservation, Snohomish County (70.0 years);
the Charleston neighborhood in Bremerton, Kitsap County (73.2
years)
- There is a 2.6 year difference between life expectancy in King and
Pierce counties, counties with the highest and lowest countywide
averages, respectively.
2. Facet of most recent data
Create Visual
Cardiovascular Disease Mortality by Community
Age adjusted rate per 100,000
Washington State Department of Health, 2016-2020 Washington Tracking
Network, Cardiovascular Disease Mortality - Age Adjusted Rate per
100,000; U.S. Census Bureau, 2016-2020 American Community Survey 5-Year
Estimates, Tables B02001, C17002, B22010, B11005, B11007, C16002
Insights & Analysis
- The smallest difference in life expectancy between communities with
high and low concentrations of households with lower income is in
Snohomish County (3.3 years), while the largest difference is in Pierce
County (6.3 years).
- The life expectancy of communities with high concentrations of
households with limited English proficiency is lower in all counties -
ranging from Pierce (76.3 years), with the lowest life expectancy, to
Kitsap (79.7 years), with the highest life expectancy.
- Regionally, communities with higher concentrations of people with
disabilities have lower life expectancies than those without
disabilities by 3.5 years.
- Communities with high concentrations of households with youth have
life expectancies 1.4 years longer than households without youth in 3 of
the counties: King, Kitsap, and Snohomish. The difference in Pierce
County is almost negligible (0.1 year).
- The life expectancy of communities with high concentrations of
households with lower income is shortest in Pierce County at 75.1 years-
2.1 fewer years than the regional average for communities with high
concentrations of households with lower income (77.2 years).
3. Facet of trend data
Create Visual
Cardiovascular Disease Mortality Trend by Community
Age adjusted rate per 100,000, in 5-year spans between 2010 and 2020
Washington State Department of Health, 2006-2010, 2011-2015, 2016-2020
Washington Tracking Network, Cardiovascular Disease Mortality - Age
Adjusted Rate per 100,000; U.S. Census Bureau, 2006-2010, 2011-2015,
2016-2020 American Community Survey 5-Year Estimates, Tables B02001,
C17002, B22010, B11005, B11007, C16002
Insights & Analysis
- Snohomish County is the only county in the region where the life
expectancy of communities with high concentrations of people of color is
similar to or slightly higher than the life expectancy of communities
with low concentrations of people of color, a trend consistent over most
of the past decade.
- The life expectancy gaps between areas with high and low
concentrations of households with lower income decreased in King (-0.5
years), Kitsap (-9.8 years), and Pierce (-5.4 years) counties between
2012 and 2022. In Snohomish County the gap increased from 1.2 years in
2012 to 3.3 years in 2022.
- The 2022 life expectancy of communities with high concentrations of
households with limited English proficiency is shortest in Pierce County
(76.3 years), compared to Kitsap (79.7 years), King (79.6 years), and
Snohomish (79 years).
- The regional life expectancy gap is 2.2 years between communities
with high and low concentrations of people of color in 2022, a 33%
smaller gap than in 2012.
- The regional life expectancy gap decreased 27% between areas with
high and low concentrations of households with lower income between 2012
and 2022.
- In 2022, communities with high concentrations of individuals with a
disability had a lower life expectancy (77.9 years) than communities
with low concentrations of individuals without a disability (81.4
years).
Transfer files
Copy files from Github > Y drive/update folder
This step will transfer all of the Rmd output files (html and docx)
to the network for review. It will keep the Rmd files within GitHub so
that code is kept in a central place.
Copy files from Y drive/indicator folder > Y
drive/indicator/archive folder
This step will transfer the previous data and files to the archive
folder. This step is meant to retain the older versions in case they are
needed for reference.
Delete old files from indicator folder
This step will clean the indicator folder to make room for the new
versions.
Copy new files from Y drive/update folder > Y drive/indicator
folder
This step will move all of the updated data/files to the general
indicator folder. They should be moved from the update (draft staging
directory) to the parent folder so that the htmls can be copied to the
webpage folder (outside the firewall).
Clear Y drive/update folder
This step will help keep the folders organized and ready for the next
update.
Copy files from Y drive/indicator folder > website folder
This step copies the htmls for the webpage (3 visuals) from the
network to the folder outside the firewall- this ‘external’ folder
connects directly to the webpage.
Back to top of the page